import config from "@/config"
import http from "@/utils/request"

export default {
	// 合同
	agree: {
		list: {
			url: `${config.API_URL}/agree/list.do`,
			name: "列表",
			post: async function(data, config = {}) {
				return await http.post(this.url, data, config);
			}
		},
		save: {
			url: `${config.API_URL}/agree/save.do`,
			name: "新增/修改",
			post: async function(data, config = {}) {
				return await http.post(this.url, data, config);
			}
		},
		delete: {
			url: `${config.API_URL}/agree/delete.do`,
			name: "删除",
			post: async function(data, config = {}) {
				return await http.post(this.url, data, config);
			}
		},
		info: {
			url: `${config.API_URL}/agree/get.do`,
			name: "详细",
			post: async function(data, config = {}) {
				return await http.post(this.url, data, config);
			}
		},
	},
	// 保险
	insure: {
		list: {
			url: `${config.API_URL}/insure/list.do`,
			name: "列表",
			post: async function(data, config = {}) {
				return await http.post(this.url, data, config);
			}
		},
		save: {
			url: `${config.API_URL}/insure/save.do`,
			name: "新增/修改",
			post: async function(data, config = {}) {
				return await http.post(this.url, data, config);
			}
		},
		delete: {
			url: `${config.API_URL}/insure/delete.do`,
			name: "删除",
			post: async function(data, config = {}) {
				return await http.post(this.url, data, config);
			}
		},
		info: {
			url: `${config.API_URL}/insure/get.do`,
			name: "详细",
			post: async function(data, config = {}) {
				return await http.post(this.url, data, config);
			}
		},
	},
}